package com.yonyou.pmclouds.plantemplate.entity;

import com.yonyou.pmclouds.basecom.entity.SuperVO;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.Date;

@EqualsAndHashCode(callSuper = true)
@Data
@Table(name = "pm_schedule_template")
public class ScheduleTemplateVO extends SuperVO {

    public static final String NAME = "name";

    public static final String CREATOR = "creator";

    public static final String CREATOR_NAME = "creatorName";

    public static final String MODIFIER = "modifier";

    public static final String MODIFY_TIME = "modifytime";

    public static final String CHANGE_FLAG = "changeFlag";

    public static final String PK_ORG = "pkOrg";

    public static final String TYPE = "type";

    @Id
    @NotNull(groups = UpdateValid.class)
    private String pkScheduleTemplate;

    @NotNull(groups = InsertValid.class)
    private String pkTenant;

    @Size(max = 50)
    @NotNull
    private String name;

    private String code;

    private String type;

    private String source;

    private String pkOrg;

    private int seq;

    @Size(max = 300)
    private String description;

    private String creator;

    private Date creationtime;

    private String modifier;

    private Date modifytime;

    @Transient
    private ScheduleTemplateItemVO[] scheduleTemplateItemVOS;

    @Transient
    private int childCount;

    @Transient
    private String[] deletePlan;

    @Transient
    private String creatorName;

    @Transient
    private String typeName;

    @Transient
    private String orgName;

    public interface UpdateValid {
    }

    public interface InsertValid {
    }
}
